QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Managing Illumination Shaders

QuickDraw 3D provides routines that you can use to create and manage illumination shaders. QuickDraw 3D supplies two types of illumination shaders, Lambert illumination shaders and Phong illumination shaders.

Q3LambertIllumination_New

You can use the Q3LambertIllumination_New function to create a new illumination shader that provides Lambert illumination.

TQ3ShaderObject Q3LambertIllumination_New (void);

DESCRIPTION

The Q3LambertIllumination_New function returns, as its function result, a new illumination shader that implements a Lambert illumination model. See "Illumination Models" for information on the Lambert illumination algorithm.

Q3PhongIllumination_New

You can use the Q3PhongIllumination_New function to create a new illumination shader that provides Phong illumination.

TQ3ShaderObject Q3PhongIllumination_New (void);

DESCRIPTION

The Q3PhongIllumination_New function returns, as its function result, a new illumination shader that implements a Phong illumination model. See "Illumination Models" for information on the Phong illumination algorithm.

Q3NULLIllumination_New

You can use the Q3NULLIllumination_New function to create a new null illumination shader.

TQ3ShaderObject Q3NULLIllumination_New (void);

DESCRIPTION

The Q3NULLIllumination_New function returns, as its function result, a new null illumination shader.

Q3IlluminationShader_GetType

You can use the Q3IlluminationShader_GetType function to get the type of an illumination shader.

TQ3ObjectType Q3IlluminationShader_GetType (
                     TQ3ShaderObject shader);
shader
An illumination shader.

DESCRIPTION

The Q3IlluminationShader_GetType function returns, as its function result, the type of the illumination shader specified by the shader parameter. The types of illumination shaders currently supported by QuickDraw 3D are defined by these constants:

kQ3IlluminationTypeLambert
kQ3IlluminationTypePhong
kQ3IlluminationTypeNULL

If the specified illumination shader is invalid or is not one of these types, Q3IlluminationShader_GetType returns the value kQ3ObjectTypeInvalid .


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |